import Vue from 'vue';
import App from './App.vue';
Vue.config.productionTip = false;
//引入配置好的路由器
import router from "@/router"
//引入仓库
import store from '@/store'
//引入mock
import '@/mock/mockServer.js'
//引入swiper样式
import "swiper/css/swiper.min.css";
//引入排序图标
// import './assets/font/iconfont.css'
//引入api
import * as API from "@/api";
//注册全局组件
import TypeNav from '@/components/TypeNav';
import Carousel from "@/components/Carousel"
import Pagination from '@/components/Pagination'
import { MessageBox, Button, Form, FormItem, Input, Checkbox } from 'element-ui'
//使用全局组件
Vue.component(TypeNav.name, TypeNav);
Vue.component(Carousel.name, Carousel);
Vue.component(Pagination.name, Pagination);
//按需引入element-ui
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
Vue.use(Button);
Vue.use(Form);
Vue.use(FormItem);
Vue.use(Input)
Vue.use(Checkbox);
//引入图片懒加载
import VueLazyload from 'vue-lazyload'
import atm from '@/assets/images/1.png'
//使用图片懒加载插件
Vue.use(VueLazyload, {
  loading: atm
})
new Vue({
  render: h => h(App),
  //注册路由器
  router,
  store,
  beforeCreate() {
    Vue.prototype.$bus = this;
    Vue.prototype.$API = API;
  }
}).$mount('#app')
